package com.sky.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 用户行为日志
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = "admin_action_logs")
public class AdminActionLog {
    @Id
    private String id;
    @Field("u_id")
    private Integer uId;
    private String action;
    private String module;
    private String method;
    private Object params;  // 使用 Object 类型存储任意参数
    private String ip;
    private Date createTime;
    private boolean success;
    private String errorMsg;
    private Long executionTime;
}